<?php
/**
 * Created by PhpStorm.
 * User: 牛赞赞
 * Date: 2021/2/20
 * Time: 17:17
 */

namespace App\Model;


class GameTaskGrowList extends Model
{
    protected   $table = 'game_task_grow_list';
    protected   $fillable = ['task_name', 'task_type', 'task_param','task_order','price_name_one',
        'price_type_one','price_val_one', 'price_name_two','price_type_two',
        'price_val_two','price_name_three','price_type_three','price_val_three','create_at'];
    public      $timestamps = false;

    public static function checkRecord($id){
        try{
            $data = self::query()->where('id',$id)->first();
            if(empty($data)){
                return ['code'=>2,'msg'=>'未找到记录！'];
            }
            return ['code'=>0,'msg'=>'获取成功！','data'=>$data->toArray()];
        }catch (\Exception $e){
            return ['code'=>1,'msg'=>$e->getMessage()];
        }
    }
}